﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace bkreporting.utilities
{
    public class SqlUtilities
    {
        private static String connectionString = ConfigurationManager.ConnectionStrings["dbConnString"].ConnectionString;

        /*
         * This method Runs a query. It will automatically open the connection.
         * */
        private static void runQuery(string queryString)
        {
            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                SqlCommand command = new SqlCommand(queryString, connection);
                command.Connection.Open();
                command.ExecuteNonQuery();
            }
        }
    }
}